#include "../includes/FileApi.h"

int main(int argc, char* argv[]){
    if(argc != 2){
        std::cout << "Usage : " << argv[0] << " file path" << '\n';
        return 0;
    }
    std::string file_path(argv[1]);
    FileApi& file_api = FileApi::getInstance();
    int fd = file_api.open(file_path);
    if(fd == -1){
        std::cout << "Open file error\n";
        return 0;
    }
    if(file_api.del(fd) == -1){
        std::cout << "Delete file error\n";
        return 0;
    }
    std::cout << "Delete file success\n";
    return 0;
}